<html>
<head>
<meta name="layout" content="main" />
<title>Upload PSP Log File</title>
</head>

<body>
<script type="text/javascript">
	$(document).ready(function() {
		$('#projectId').change(function() {
			$.get('../pspData/getTaskList?projectId=' + $(this).val(), function(data) {	
				$('#taskId').html(data);			
			});
		})
	});
</script>
<div class="nav"><span class="menuButton"><a class="home"
	href="${createLink(uri: '/upload/index')}">Upload PSP Data</a></span></div>

<div class="body"><g:if test="${flash.message}">
	<div class="message">
	${flash.message}
	</div>
</g:if>
<div id="upload-form" style="padding: 10px;"><g:form
	controller="upload" method="post" action="upload"
	enctype="multipart/form-data">
	Select Project:
	<g:select id="projectId" name="projectId" from="${session.projectList}"
		noSelection="${['null':' ']}" optionKey="id" optionValue="name">
	</g:select>
	Select Task:
        <g:select id="taskId" name="taskId" from=""
		optionKey="id" optionValue="name" />
	<input type="file" name="pspLogFile" />
	<input type="submit" value="Upload! " />
</g:form></div>
</div>
</body>

</html>
